package org.grapes.wine.api.server.model.dao;

import org.grapes.wine.api.server.model.DAOName;
import org.grapes.wine.api.server.model.IDAO;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;

@Indexed
public class FeaturedCourseDAO implements IDAO {
	@DocumentId
	private String id;
	private int version;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private String courseName;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private String courseIntroduction;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private int daySum;

	public FeaturedCourseDAO() {
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public int getVersion() {
		return version;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public String getCourseIntroduction() {
		return courseIntroduction;
	}

	public void setCourseIntroduction(String courseIntroduction) {
		this.courseIntroduction = courseIntroduction;
	}

	public int getDaySum() {
		return daySum;
	}

	public void setDaySum(int daySum) {
		this.daySum = daySum;
	}

	public DAOName getDAOName() {
		return DAOName.FeaturedCourse;
	}

	public String[] paramName() {
		return new String[] { "courseName", "courseIntroduction", "daySum" };
	}
}
